package ldh.im.fxbase.service;

import ldh.im.dto.base.Dto;
import ldh.im.fxbase.data.pojo.ImCollect;
import ldh.im.fxbase.data.pojo.ImMessage;
import ldh.im.listener.FileListener;
import ldh.im.listener.FileProgressListener;

import java.sql.SQLException;
import java.util.concurrent.TimeoutException;
import java.util.function.Consumer;

public interface FileDownloadAndUploadService {

    void sendFile(ImMessage message, FileProgressListener fileProgressListener) throws Exception;

    void downloadFile(ImMessage imMessage, FileProgressListener fileListener, Consumer<ImMessage> consumer);

    void downloadFile(ImCollect imCollect);

    String sendDto(Dto dto) throws TimeoutException, InterruptedException;

    void close();
}
